#pragma once

#include <Runtime/Core/Core.h>

#include <GLFW/glfw3.h>

using namespace DirectX;

class Camera {
public:
	Camera();
	~Camera() = default;

	void UpdateMatrix();

	XMMATRIX GetViewMatrix() const { return mView; }
	XMMATRIX GetProjectionMatrix() const { return mProjection; }

	void HandleInputs(GLFWwindow* window);

private:

	XMFLOAT3 mPosition = {0.0f, 0.0f, -3.0f};
	XMFLOAT3 mOrientation = {0.0f, 0.0f, 1.0f};
	XMFLOAT3 mUp = {0.0f, 1.0f, 0.0f};

	XMINT2 mWindowSize;
	bool firstMouse = true;

	float mSpeed;
	float mSensitivity;


	XMMATRIX mView;
	XMMATRIX mProjection;

private:
	XMFLOAT3 RotateVector(XMFLOAT3 vector, float angle, XMFLOAT3 axis);


};